import request from '@/utils/request'

// 查询九小场所检查记录列表
export function listRecord(query, data) {
  return request({
    url: '/system/record/list',
    method: 'post',
    params: query,
    data: data || {}
  })
}
// 查询九小场所检查记录列表-带细单
export function list(data) {
  return request({
    url: '/9xiaorecord/list',
    method: 'post',
    data
  })
}

// 查询九小场所检查记录详细
export function getRecord(params) {
  return request({
    url: '/system/record/getrecordbyid',
    method: 'get',
    params
  })
}

// 新增九小场所检查记录
export function addRecord(data) {
  return request({
    url: '/system/record/add',
    method: 'post',
    data: data
  })
}

// 修改九小场所检查记录
export function updateRecord(data) {
  return request({
    url: '/system/record',
    method: 'put',
    data: data
  })
}

// 删除九小场所检查记录
export function delRecord(id) {
  return request({
    url: '/system/record/' + id,
    method: 'delete'
  })
}

// 获取企业检查统计
export function companyData(params) {
  return request({
    url: '/aqjc/common/companyData',
    method: 'get',
    params
  })
}

// 企业检查排行
export function companyOrder(params) {
  return request({
    url: '/aqjc/common/companyOrder',
    method: 'get',
    params
  })
}

// 企业隐患类别
export function dangerTypeRate(params) {
  return request({
    url: '/aqjc/common/dangerTypeRate',
    method: 'get',
    params
  })
}

// 9小检查统计
export function storeData(params) {
  return request({
    url: '/aqjc/common/xiaoData',
    method: 'get',
    params
  })
}

// 9小检查统计
export function mapData(params) {
  return request({
    url: '/aqjc/common/mapData',
    method: 'get',
    params
  })
}


// 删除照片
export function delphoto(params) {
  return request({
    url: '/9xiaorecord/delphoto',
    method: 'get',
    params
  })
}


// 共享
export function share(data) {
  return request({
    url: '/system/record/share',
    method: 'post',
    data
  })
}

// 导入
export const importData = process.env.VUE_APP_BASE_API + '/system/record/importExcel'
